home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / A-B / AETracker.sea / AETracker.h < prev    next >
Text File  |  1992-08-11  |  3KB  |  108 lines

  1. /* 
  2. AETracker.h 
  3.  C Interfaces to AETracker 
  4.  Created Friday, July 31, 1992 10:41:40 PM
  5.  
  6.  
  7.  Programmatic control of the AETracker INIT 
  8.  Copyright 1992, C.K. Haun, All rights reserved 
  9. */
  10.  
  11. /* AETracker gestalt selector constant */
  12. #ifndef __AETRACKER__
  13.  
  14. #define __AETRACKER__
  15.  
  16. #ifndef __TYPES__
  17.  
  18. #include <Types.h>
  19.  
  20. #endif
  21.  
  22. #ifndef __FILES__
  23.  
  24. #include <Files.h>
  25.  
  26. #endif
  27.  
  28. #define kAETrackerGestalt 'CKI3'
  29. /* control selectors */
  30. enum  {
  31.     kAETToggle = 0,                                         /* turn AETracker on and off */
  32.     kAETStatus,                                             /* get AETracker status */
  33.     kAETInterceptOutput,                                    /* intercept AETracker text output */
  34.     kAETReconnectOutput,                                    /* reconnect output */
  35.     kAETInterceptParse,                                     /* intercept AETracker AppleEvent routine parsing */
  36.     kAETReconnectParse,                                     /* reconnect parsing */
  37.     kAETSetPrefs,                                           /* temporarily modify AETracker settings */
  38.     kAETEmergencyReset                                      /* undo any external changes to AETracker */
  39. };
  40.  
  41. /* This is the preferences structure that AETracker uses. */
  42. /* Can be modified and passed to kAETSetPrefs */
  43. struct PrefsStruct {
  44.     long keyMask1;
  45.     long keyMask2;
  46.     short collectFrom;
  47.     short collectLevel;
  48.     short modKeys[4];
  49.     long actionKey;
  50.     short infoLevel;
  51.     short disabled;
  52.     short findMBug;
  53. };
  54.  
  55.  
  56. /* Flag values for controlling AETracker */
  57. enum  {
  58.     kAETDisconnectRegularOutput = 0x1, kAETNoFileOutput = 0x2, kAETDisconnectRegularParse = 0x4, kAETUsePassedFileFSSpec = 0x8
  59. };
  60.  
  61. /* error codes */
  62. enum  {
  63.     kAETBadSelectorErr = 8080,                              /* returned by AEtracker */
  64.     kAETBadParamBlockErr,                                   /* something weird in the PB you passed (missing or incomplete) */
  65.     kAETAlreadyInterceptedErr                               /* someone has already intercepted AETracker. */
  66. };
  67. /* Definitions for routines you pass to AETracker */
  68. /* routine to intercept text output */
  69. typedef pascal OSErr(*externOutputProcPtr)(ParmBlkPtr paramBlock, long refCon);
  70. /* routine to intercept AppleEvent calls */
  71. typedef pascal OSErr(*externParseOutputProcPtr)(Ptr AEParmPtr, long AESelector, long refCon);
  72.  
  73. typedef struct AETrackerStatusBlock {
  74.     short AETActive;
  75.     short fileInterceptActive;
  76.     short fileExclusiveIntercept;
  77.     externOutputProcPtr fileInterceptRoutine;
  78.     long fileRefCon;
  79.     short parseInterceptActive;
  80.     short parseExclusiveIntercept;
  81.     externParseOutputProcPtr parseInterceptRoutine;
  82.     long parseRefCon;
  83. } AETrackerStatusBlock;
  84. typedef AETrackerStatusBlock *AETrackerStatusBlockPtr, **AETrackerStatusBlockHdl;
  85. /* Param block for calls to AETracker */
  86.  
  87. typedef struct AETrackExtParam {
  88.     short fileRefNum;
  89.     FSSpec outFile;
  90.     union  {
  91.         externOutputProcPtr outputPtr;
  92.         externParseOutputProcPtr outputParsePtr;
  93.     } procs;
  94.     union  {
  95.         AETrackerStatusBlockPtr statusData;
  96.         Ptr externDataPtr;
  97.     } dataPtrs;
  98.     long refCon;
  99.     unsigned short flags;
  100. } AETrackExtParam;
  101. typedef AETrackExtParam *AETrackExtParamPtr, **AETrackExtParamHdl;
  102.  
  103. /* Definition of interface to AETracker through Gestalt returned pointer */
  104. typedef pascal OSErr(*AETrackExternProcPtr)(AETrackExtParamPtr theParm, short selector);
  105.  
  106.  
  107. #endif /* included... */
  108.